<template>
  <rx-dialog @handOk="handleSubmit" @cancel="cancel">
    <rx-layout>
      <div slot="center">
        <a-form :form="form">
          <a-form-item style="display:none">
            <a-input v-decorator="['pkId']"/>
          </a-form-item>
          <a-form-item  :labelCol="labelCol1" :wrapperCol="wrapperCol1" :label="i18n('routeTypeManage.typeName','路由类型名称')">
              <rx-input-i18n style="width: 80%" :placeholder="i18n('routeTypeManage.typeName','路由类型名称')"
                     v-decorator="['routeTypeName', {rules: [{required: false, message: i18n('routeTypeManage.typeName','路由类型名称','input')}]}]"/>
          </a-form-item>
          <a-form-item :labelCol="labelCol1" :wrapperCol="wrapperCol1" :label="i18n('routeTypeManage.desc','描述')">
            <a-textarea :placeholder="i18n('routeTypeManage.desc','描述')" v-decorator="['describe', {rules: [{required: false, message: i18n('routeTypeManage.desc','描述','input')}]}]" :rows="4"/>
          </a-form-item>
        </a-form>
      </div>
    </rx-layout>
  </rx-dialog>
</template>
<script>
  import SysRouteTypeApi from '@/api/system/core/sysRouteType'
  import {BaseForm, RxDialog} from "@lowcode/jpaas-common-lib";

  export default {
    name: 'SysRouteTypeEdit',
    mixins: [BaseForm],
    components: {
      RxDialog,
    },
    data(){
      return{
        labelCol1:4,
        wrapperCol1:18
      }
    },
    methods: {
      i18n(name,text,key){
          return this.$ti18(name,text,"SysRouting",key);
      },
      get(id) {
        return SysRouteTypeApi.get(id);
      },
      save(values) {
        return SysRouteTypeApi.save(values);
      }

    }
  }
</script>
